home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / Mac F2C 1.2.2 / CodeWarrior Support / F2C MPW⁄ToolServer Tools / ToolServer READ ME < prev   
Encoding:
Text File  |  1995-03-22  |  3.4 KB  |  111 lines  |  [TEXT/MMCC]

  1. USING MPW TOOLS WITH CODEWARRIOR IDE, TOOLSERVER AND MAC F2C
  2.  
  3. The folder "MPW/Toolserver Tools" contains three MPW tools: F2CMake,
  4. CWMake and CWOpen.
  5.  
  6. Metrowerks CodeWarrior comes with the complete MPW environment and with
  7. Toolserver, a program that lets you execute MPW tools and scripts.
  8. If you start Toolserver from the CW environment, you get a text shell
  9. window where you can type commands. Please refer to the Toolserver
  10. documentation on the CW CD for more information.
  11.  
  12. F2CMake accepts a command line string containing Unix style options and
  13. one or more filenames to send them in a "kAEf2cEvent" AppleEvent to
  14. Mac F2C which will translate the file(s). If Mac F2C is not currently
  15. running, F2CMake will try to launch it.
  16.  
  17. CWMake simply sends a "Make" event to the CW C enviroment that is
  18. currently running (68K or PPC version).
  19.  
  20. CWOpen sends an 'Open' AppleEvent to the CW PPC or 68K C compiler,
  21. whichever is currently running. The command line should contain the
  22. name(s) of the file(s) to open.
  23.  
  24. With the help of these tools you can automate the building process
  25. of Fortran programs. You can edit your Fortran files and just execute
  26. a Makefile which scans all the files belonging to a project, tells
  27. Mac F2C to translate the ones that have to and tells CW to build the
  28. program. CWOpen is not needed in this progress, but it is useful if
  29. you would like to open, say, all the .e files that Mac F2C produces
  30. (Just type "CWOpen ≈.e" in the Toolserver shell window).
  31.  
  32.  
  33. INSTALLATION
  34.  
  35.     - Copy "F2CMake", "CWMake" and "CWOpen" into the "Tools" folder
  36.       that Toolserver uses
  37.       
  38.     - Copy "F2C.Help" into the Toolserver folder.
  39.  
  40.     - Copy "Make" from the MPW distribution into the same folder
  41.     
  42.     - Copy the MPW script "BuildProgram" into the "Scripts"
  43.       folder of Toolserver
  44.     
  45.     - Make sure the "After Producing a valid C File, Inform..."
  46.       options in the Mac F2C Preferences dialog are unchecked.
  47.       
  48.  
  49. USAGE
  50.  
  51. First Build:
  52.  
  53.     - Use Mac F2C manually to translate your Fortran source
  54.       into C.
  55.       
  56.     - Add the resulting C sources to the "Empty" project and let
  57.       CW make the program.
  58.     
  59.     - Enter a Makefile like this one in a new editor window:
  60.     
  61.     
  62. OBJECTS =   prog1.c ∂
  63.             prog2.c ∂
  64.             prog3.c ∂
  65.             prog4.c
  66.  
  67. Basistest   ƒƒ  {OBJECTS}
  68.     CWMake
  69.         
  70. .c  ƒ   .f
  71.     F2CMake -f -!i8 -A -a -E -ec -R -w66 {Default}.f
  72.         
  73.       
  74.       The source file names (prog1.c, prog2.c,...) as well as the
  75.       F2C options are just examples.
  76.       
  77.     - Save the Makefile under the name "Makefile" into your
  78.       project folder.
  79.  
  80.  
  81. Subsequent Builds:
  82.       
  83.     - Start Toolserver.
  84.     
  85.     - Use the "Directory" command to move to your project folder.
  86.     
  87.     - Edit your Fortran source files.
  88.     
  89.     - Type "BuildProgram <name>", where <name> is the name of the
  90.       program as given in the CW Preferences of your project.
  91.       The commands needed to update the project are executed and
  92.       written to the shell window. Mac F2C runs faster if you bring
  93.       it to the foreground.
  94.  
  95.  
  96. If you need help about one of the F2C MPW tools, type
  97.  
  98.     help -f "{MPW}F2C.Help" toolname
  99.     
  100.     
  101. If you don't like to type long command names (like me), include a
  102. few alias entries in your "UserStartupTS" file, e.g.
  103.  
  104. Alias cd Directory
  105. Alias touch setfile -m .
  106. Alias edit CWOpen
  107. Alias pmake BuildProgram
  108.  
  109. You can even include a "Directory <whereYourProjectsAre>" command
  110. here so you don't have to type the pathname all the time.
  111.